// 表格列
export const columns = [
  { title: '序号', dataIndex: 'index', key: 'index', width: 50, fixed: 'left', align: 'center', customRender: ({ index }) => index + 1 },
  { title: '账期', dataIndex: 'accountPeriod', key: 'accountPeriod', width: 120 },
  { title: '区域', dataIndex: 'area', key: 'area', width: 100, ellipsis: true },
  { title: '码', dataIndex: 'code', key: 'code', width: 100, ellipsis: true },
  { title: '品名', dataIndex: 'productName', key: 'productName', width: 120, ellipsis: true },
  { title: '规格型号', dataIndex: 'specification', key: 'specification', width: 120, ellipsis: true },
  { title: '计量', dataIndex: 'unit', key: 'unit', width: 80 },
  { title: '期初量', dataIndex: 'beginningQuantity', key: 'beginningQuantity', width: 100 },
  { title: '期初成本', dataIndex: 'beginningCost', key: 'beginningCost', width: 100 },
  { title: '入库量', dataIndex: 'inQuantity', key: 'inQuantity', width: 100 },
  { title: '入库成本', dataIndex: 'inCost', key: 'inCost', width: 100 },
  { title: '出库量', dataIndex: 'outQuantity', key: 'outQuantity', width: 100 },
  { title: '出库成本', dataIndex: 'outCost', key: 'outCost', width: 100 },
  { title: '期末量', dataIndex: 'endingQuantity', key: 'endingQuantity', width: 100 },
  { title: '期末成本', dataIndex: 'endingCost', key: 'endingCost', width: 100 },
  { title: '单价', dataIndex: 'unitPrice', key: 'unitPrice', width: 100 },
  { title: '操作', dataIndex: 'action', key: 'action', width: 120, bodySlot: 'action', fixed: 'right' },
]

// 表单模型
export const formModel = {
  id: null,
  accountPeriod: null,
  area: '',
  code: '',
  productName: '',
  specification: '',
  unit: '',
  beginningQuantity: null,
  beginningCost: null,
  inQuantity: null,
  inCost: null,
  outQuantity: null,
  outCost: null,
  endingQuantity: null,
  endingCost: null,
  unitPrice: null,
}

// Excel导入参数
export const excelParam = {
  fileName: '库存账期模板.xlsx',
  downLoadUrl: 'http://192.168.1.99:9000/bee-mall/库存账期模板.xlsx',
  api: '/admin/inventoryPeriod/import',
}